home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 3: The Continuation / 17-Bit_The_Continuation_Disc.iso / amigan / amigan 14 / compu-calc! / input.asm < prev    next >
Encoding:
Assembly Source File  |  1994-01-27  |  11.8 KB  |  731 lines

  1.     nolist
  2.     include 'exec/types.i'
  3.     include 'exec/memory.i'
  4.     include 'intuition/intuition.i'
  5.     include 'graphics/rastport.i'
  6.     list
  7.  
  8. ;    Version 1.0
  9. ;    Input.asm
  10. ;
  11. ;    These routines handle the actual actions made from the user
  12. ;        (the meat!)
  13. ;
  14.  
  15. execute    MACRO
  16.     XREF    _LVO\1
  17.     jsr    _LVO\1(a6)
  18.     ENDM
  19.  
  20.     xref    Finevnt,Input
  21.     xdef    num,Clear,Cl,Funct
  22.     xdef    Display,VarPtr
  23.  
  24. ExecB    Equ    4
  25.  
  26. ;    D1 is the gadget number pressed (0-15)
  27. ;    A4 is the pointer to the window
  28.  
  29. num    lea    Err,a0
  30.     move.l    0(a0),d3
  31.     cmpi.l    #1,d3
  32.     beq.l    NODO
  33.     lea    Const,a0
  34.     move.l    0(a0),d0
  35.     beq.s    numgo
  36.     moveq    #0,d2
  37.     move.l    d2,0(a0)
  38.     lea    VarPtr,a0
  39.     move.l    0(a0),d0
  40.     move.l    d2,4(a0,d0.w)
  41. numgo    lea    Input,a0
  42.     move.w    0(a0),d0
  43.     cmpi.w    #3,d0
  44.     bne.s    Npt1
  45.  
  46. ;    BIN Input
  47.     cmpi.l    #1,d1
  48.     bgt.l    Finevnt
  49.     lea    VarPtr,a0
  50.     move.l    0(a0),d0
  51.     move.l    4(a0,d0.w),d2    ; get current variable
  52.     lsl.l    #1,d2
  53.     or.l    d1,d2
  54.     move.l    d2,4(a0,d0.w)
  55.     jmp    Npt
  56.  
  57. Npt1    lea    Input,a0
  58.     move.w    0(a0),d0
  59.     cmpi.w    #2,d0
  60.     bne.s    Npt2
  61.  
  62. ;    Oct Input
  63.     cmpi.l    #7,d1
  64.     bgt.l    Finevnt
  65.     lea    VarPtr,a0
  66.     move.l    0(a0),d0
  67.     move.l    4(a0,d0.w),d2    ; get current variable
  68.     lsl.l    #3,d2
  69.     or.l    d1,d2
  70.     move.l    d2,4(a0,d0.w)
  71.     jmp    Npt
  72.  
  73. Npt2    lea    Input,a0
  74.     move.w    0(a0),d0
  75.     cmpi.w    #0,d0
  76.     bne.s    Npt3
  77.  
  78. ;    Hex Input
  79.     lea    VarPtr,a0
  80.     move.l    0(a0),d0
  81.     move.l    4(a0,d0.w),d2    ; get current variable
  82.     lsl.l    #4,d2
  83.     or.l    d1,d2
  84.     move.l    d2,4(a0,d0.w)
  85.     jmp    Npt
  86.  
  87. Npt3    lea    Input,a0
  88.     move.w    0(a0),d0
  89.     cmpi.w    #1,d0
  90.     bne.s    Npt
  91.  
  92. ;    Dec Input
  93.     cmpi.l    #9,d1
  94.     bgt.l    Finevnt
  95.     lea    VarPtr,a0
  96.     move.l    0(a0),d0
  97.     move.l    4(a0,d0.w),d2    ; get current variable
  98.     moveq    #0,d4
  99.     move.l    d2,d3
  100.     lsl.l    #1,d3
  101.     add.l    d3,d4
  102.     lsl.l    #2,d3
  103.     add.l    d3,d4
  104.     add.l    d1,d4
  105.     move.l    d4,4(a0,d0.w)
  106.  
  107. Npt    jsr    Display
  108.     jmp    Finevnt
  109.  
  110. ;
  111. ;    This routine prints the value in the current variable
  112. ;    position
  113. ;
  114.  
  115. Display    lea    VarPtr,a0
  116.     move.l    0(a0),d0
  117.     move.l    4(a0,d0.w),d2    ; get current variable
  118.     cmpi.l    #0,d2
  119.     bne.s    Ncont
  120.     jsr    Cl        ; cheap but effective way to eliminate
  121.     rts            ; total leading zeros elimination on 0
  122. Ncont    jsr    BtoA
  123.     jsr    HtoA
  124.     jsr    OtoA
  125.     jsr    BtoB
  126.     jsr    print
  127.     rts
  128.  
  129. print    move.l    wd_RPort(a4),a0
  130.     lea    ItextH,a1
  131.     moveq    #17,d0
  132.     moveq    #16,d1
  133.     execute    PrintIText
  134.     move.l    wd_RPort(a4),a0
  135.     lea    ItextO,a1
  136.     moveq    #17,d0
  137.     moveq    #26,d1
  138.     execute    PrintIText
  139.     move.l    wd_RPort(a4),a0
  140.     lea    ItextB,a1
  141.     moveq    #17,d0
  142.     moveq    #36,d1
  143.     execute    PrintIText
  144.     move.l    wd_RPort(a4),a0
  145.     lea    ItextD,a1
  146.     moveq    #17,d0
  147.     moveq    #46,d1
  148.     execute    PrintIText
  149.     rts
  150.  
  151. Cl    lea    CBufB,a0
  152.     lea    BufferB,a1
  153.     moveq    #0,d0
  154. lpCl    move.w    0(a0,d0),d1
  155.     move.w    d1,0(a1,d0)
  156.     addi.w    #2,d0
  157.     cmpi.w    #136,d0
  158.     bne.s    lpCl
  159.     jsr    print
  160.     lea    VarPtr,a0
  161.     rts
  162.  
  163.  
  164. Init    moveq    #0,d0        ; Init clear values
  165.     move.l    d0,0(a0)    ; Var 1,2 and pointer
  166.     move.l    d0,4(a0)
  167.     move.l    d0,8(a0)
  168.     move.l    d0,12(a0)    ; Operation
  169.     lea    Const,a0    ; Constant
  170.     move.l    d0,0(a0)
  171.     lea    Err,a0
  172.     move.l    d0,0(a0)
  173.     rts
  174.  
  175. Clear    jsr    Cl
  176.     jsr    Init
  177.     jmp    Finevnt
  178.  
  179. ;***************************************************
  180. ;*        ClearT                   *
  181. ;*    Sets T Buffer variable equal to spaces     *
  182. ;***************************************************
  183.  
  184. ClearT    lea    BufferT,a0
  185.     move.b    #$20,d0
  186.     moveq    #$0,d1
  187. Cllp    move.b    d0,0(a0,d1.w)
  188.     addi.l    #1,d1
  189.     cmpi.l    #$32,d1
  190.     blt.s    Cllp
  191.     rts
  192.  
  193. ;***************************************************
  194. ;*        HtoA                   *
  195. ;*    Converts variable pointed to by VarPtr to  *
  196. ;*     a 32 byte HEX ascii string for displaying. *
  197. ;***************************************************
  198.  
  199. HtoA    jsr    ClearT
  200.     lea    VarPtr,a0
  201.     move.l    0(a0),d0
  202.     move.l    4(a0,d0.w),d0    ; get current varible
  203.     lea    BufferT,a1
  204.     move.l    #29,d3
  205. HtoAtp    move.l    d0,d2
  206.     andi.l    #%00000000000000000000000000001111,d2
  207.     addi.l    #$30,d2        ; ascii offset for num
  208.     cmpi.l    #$39,d2
  209.     ble.s    HtoAct
  210.     addi.l    #$7,d2        ; ascii offset for alpha
  211. HtoAct    move.b    d2,0(a1,d3.w)
  212.     lsr.l    #4,d0
  213.     subi.l    #4,d3
  214.     cmpi.l    #1,d3
  215.     bge.s    HtoAtp
  216.  
  217.     lea    BufferT,a1
  218.     lea    BufferH,a0
  219.     jsr    Rmzero
  220.     rts
  221.  
  222.  
  223. ;***************************************************
  224. ;*        OtoA                   *
  225. ;*    Converts variable pointed to by VarPtr to  *
  226. ;*     a 32 byte Oct ascii string for displaying. *
  227. ;***************************************************
  228.  
  229. OtoA    jsr    ClearT
  230.     lea    VarPtr,a0
  231.     move.l    0(a0),d0
  232.     move.l    4(a0,d0.w),d0    ; get current variable
  233.     lea    BufferT,a1
  234.     move.l    #30,d3
  235. OtoAtp    move.l    d0,d2
  236.     andi.l    #%00000000000000000000000000000111,d2
  237.     addi.l    #$30,d2        ; ascii offset for num
  238.     move.b    d2,0(a1,d3.w)
  239.     lsr.l    #3,d0
  240.     subi.l    #3,d3
  241.     cmpi.l    #0,d3
  242.     bge.s    OtoAtp
  243.  
  244.     lea    BufferT,a1
  245.     lea    BufferO,a0
  246.     jsr    Rmzero
  247.     rts
  248.  
  249.  
  250.  
  251. ;***************************************************
  252. ;*        BtoA                   *
  253. ;*    Converts variable pointed to by VarPtr to  *
  254. ;*     a 32 byte BIN ascii string for displaying. *
  255. ;***************************************************
  256.  
  257. BtoA    jsr    ClearT
  258.     lea    VarPtr,a0
  259.     move.l    0(a0),d0
  260.     move.l    4(a0,d0.w),d0    ; get current variable
  261.     lea    BufferT,a1
  262.     move.b    #$30,d2
  263.     move.b    #$31,d3
  264.     move.l    #31,d1
  265.     moveq    #0,d4
  266. BtoAlp    btst.l    d1,d0
  267.     beq.s    BZero
  268.     move.b    d3,0(a1,d4)
  269.     jmp    BtoAf
  270. BZero    move.b    d2,0(a1,d4)
  271. BtoAf    addi.l    #1,d4
  272.     subi.l    #1,d1
  273.     bpl.s    BtoAlp
  274.  
  275.     lea    BufferT,a1
  276.     lea    BufferB,a0
  277.     jsr    Rmzero
  278.     rts
  279.  
  280. ;******************************************************************
  281. ;*        Rmzero        Kill leading zeros          *
  282. ;*    Inputs:    a0 pointer to destination buffer          *
  283. ;*        a1 pointer to source                  *
  284. ;*    Bad:    d0,d1,d3,d4                      *
  285. ;******************************************************************
  286.  
  287. Rmzero    move.l    #$20,d3        ; remove leading zeros
  288.     move.l    d3,d4
  289.     move.l    #0,d1
  290. Rmzlp1    move.b    0(a1,d1.w),d0
  291.     cmpi.b    #$30,d0
  292.     beq.s    Rmzzr
  293.     cmpi.b    #$20,d0
  294.     beq.s    Rmzlp2
  295.     move.l    #$30,d3
  296.     move.b    d0,0(a0,d1)
  297.     jmp    Rmzze
  298.  
  299. Rmzlp2    move.b    d4,0(a0,d1)
  300.     jmp    Rmzze
  301.  
  302. Rmzzr    move.b    d3,0(a0,d1)
  303. Rmzze    addi.l    #1,d1
  304.     cmpi.l    #32,d1
  305.     bne.s    Rmzlp1
  306.     rts
  307.  
  308. ;**************************************************
  309. ;*        BIN to BCD              *
  310. ;**************************************************
  311.  
  312. BtoB    lea    DecTemp,a0    ; Clear Working buff
  313.     moveq    #0,d0
  314.     move.w    d0,0(a0)
  315.     move.w    d0,2(a0)
  316.     move.w    d0,4(a0)
  317.  
  318.     lea    VarPtr,a0
  319.     move.l    0(a0),d0
  320.     move.l    4(a0,d0.w),d0    ; get current variable
  321.     moveq    #0,d3        ; constant pointer
  322.     lea    DecCon2,a2
  323.     moveq    #8,d4
  324. BtoBtp    move.l    d0,d2
  325.     andi.l    #%00000000000000000000000000001111,d2
  326. BtoBlp1    beq.s     BtoBdn
  327.     lea    DecCon1,a0    ; Temp pointer
  328.     andi.b    #$EF,ccr
  329.     move.l    a2,a1
  330.     adda.l    d3,a1        ; current pointer to con
  331. BtoBlp2    abcd    -(a1),-(a0)
  332.     cmpa.l    #DecTemp,a0
  333.     bne.s    BtoBlp2
  334.     subi.l    #1,d2
  335.     jmp    BtoBlp1
  336.  
  337. BtoBdn    lsr.l    #4,d0
  338.     addi.l    #6,d3
  339.     subi.l    #1,d4
  340.     bne.s    BtoBtp
  341.  
  342.     lea    DecTemp,a0    ; change buffer to ascii
  343.     lea    AscTmp,a1
  344.     moveq    #0,d0        ; input buf
  345.     moveq    #0,d3        ; out buf
  346. BtoBlp3    move.b    0(a0,d0),d2
  347.     move.b    d2,d1
  348.     lsr.b    #4,d1
  349.     andi.b    #$0F,d1
  350.     addi.b    #$30,d1
  351.     move.b    d1,0(a1,d3)
  352.     move.b    d2,d1
  353.     andi.b    #$0F,d1
  354.     addi.b    #$30,d1
  355.     move.b    d1,1(a1,d3)
  356.     addi.l    #2,d3
  357.     addi.l    #1,d0
  358.     cmpi.l    #7,d0
  359.     bne.s    BtoBlp3
  360.  
  361.     lea    BufDec,a1
  362.     lea    BufferD,a0
  363.     jsr    Rmzero
  364.  
  365.     rts
  366.  
  367. ;
  368. ;    Function: This routine handles all process of
  369. ;         function keys.
  370. ;
  371.  
  372. Funct    lea    Err,a0
  373.     move.l    0(a0),d3
  374.     cmpi.l    #1,d3
  375.     beq.l    NODO
  376.     subi.l    #15,d1        ; d1=0-5 (nop,+,-,*,/,=)
  377.     cmpi    #5,d1
  378.     beq.s    equal
  379.     lea    Const,a0
  380.     move.l    0(a0),d0
  381.     bne.l    per        ; =1
  382.  
  383. equal    lea    VarPtr,a0
  384.     move.l    12(a0),d3    ;Operation
  385.     beq.l    noper
  386.  
  387.     cmpi.l    #1,d3
  388.     bne.s    Sub0
  389.  
  390.     move.l    0(a0),d4
  391.     beq.s    Fzer0
  392.     move.l    4(a0,d4.w),d6
  393.     add.l    d6,0(a0,d4.w)
  394.     jmp    FDis
  395. Fzer0    move.l    0(a0,d4.w),d6
  396.     add.l    d6,4(a0,d4.w)
  397. FDis    cmpi    #5,d1
  398.     beq.s    nodo
  399.     move.l    d1,12(a0)
  400. nodo    jsr    Fswap
  401.     jsr    Display
  402.     jsr    Fswap
  403.     moveq    #1,d0
  404.     lea    Const,a0
  405.     move.l    d0,0(a0)
  406. NODO    jmp    Finevnt
  407.  
  408. Sub0    cmpi.l    #2,d3
  409.     bne.s    Mul0
  410.  
  411.     move.l    0(a0),d4
  412.     beq.s    Szer0
  413.     move.l    4(a0,d4.w),d6
  414.     sub.l    d6,0(a0,d4.w)
  415.     jmp    SDis
  416. Szer0    move.l    0(a0,d4.w),d6
  417.     sub.l    d6,4(a0,d4.w)
  418. SDis    cmpi.l    #5,d1
  419.     beq.s    nodo1
  420.     move.l    d1,12(a0)
  421. nodo1    jsr    Fswap
  422.     jsr    Display
  423.     jsr    Fswap
  424.     moveq    #1,d0
  425.     lea    Const,a0
  426.     move.l    d0,0(a0)
  427.     jmp    Finevnt
  428.  
  429. Mul0    cmpi.l    #3,d3
  430.     bne.l    Div0
  431.  
  432.     move.l    0(a0),d4
  433.     beq.s    Mzer0
  434.     move.l    4(a0,d4.w),d6
  435.     move.l    0(a0,d4.w),d7
  436.  
  437.     moveq    #0,d3
  438.     cmpi.l    #0,d6
  439.     beq.l    MulE1
  440.     cmpi.l    #0,d7
  441.     beq.l    MulE1
  442.  
  443. ;    Mult
  444. ;    input d6,d7
  445. ;    output d3
  446. ;    distroyed d4,d5
  447.  
  448. Mult    moveq    #31,d5
  449. mlp1    btst.l    d5,d6
  450.     dbne    d5,mlp1
  451.  
  452.     addi.l    #1,d5
  453.     moveq    #0,d4
  454.     moveq    #0,d3
  455. mlp2    lsr.l    #1,d6
  456.     bcc.s    Mnoadd
  457.     add.l    d7,d3
  458.     bvs.l    error
  459. Mnoadd    lsl.l    #1,d7
  460.     bcs.l    error
  461.     addi.l    #1,d4
  462.     cmp.l    d4,d5
  463.     bne.s    mlp2
  464.  
  465. MulE1    move.l    0(a0),d4
  466.     move.l    d3,0(a0,d4.w)
  467.     jmp    Mdis
  468.  
  469. Mzer0    move.l    0(a0,d4.w),d6
  470.     move.l    4(a0,d4.w),d7
  471.  
  472.     moveq    #0,d3
  473.     cmpi.l    #0,d6
  474.     beq.l    MulE2
  475.     cmpi.l    #0,d7
  476.     beq.l    MulE2
  477.  
  478. ;    Mult
  479. ;    input d6,d7
  480. ;    output d3
  481. ;    distroyed d4,d5
  482.  
  483. Mult1    moveq    #31,d5
  484. mlp11    btst.l    d5,d6
  485.     dbne    d5,mlp11
  486.  
  487.     addi.l    #1,d5
  488.     moveq    #0,d4
  489.     moveq    #0,d3
  490. mlp21    lsr.l    #1,d6
  491.     bcc.s    Mnoadd1
  492.     add.l    d7,d3
  493.     bvs.l    error
  494. Mnoadd1    lsl.l    #1,d7
  495.     bcs.l    error
  496.     addi.l    #1,d4
  497.     cmp.l    d4,d5
  498.     bne.s    mlp21
  499.  
  500. MulE2    move.l    0(a0),d4
  501.     move.l    d3,4(a0,d4.w)
  502.  
  503. Mdis    cmpi.l    #5,d1
  504.     beq.s    nodo2
  505.     move.l    d1,12(a0)
  506. nodo2    jsr    Fswap
  507.     jsr    Display
  508.     jsr    Fswap
  509.     moveq    #1,d0
  510.     lea    Const,a0
  511.     move.l    d0,0(a0)
  512.     jmp    Finevnt
  513.  
  514. Div0    cmpi.l    #4,d3
  515.     bne.l    nopcnt
  516.  
  517.     move.l    0(a0),d4
  518.     beq.s    Dzer0
  519.     move.l    4(a0,d4.w),d7
  520.     move.l    0(a0,d4.w),d6
  521.  
  522. ;    Divide
  523. ;    input d6,d7
  524. ;    output d3
  525. ;    distroyed d2,d4,d5
  526.  
  527.     moveq    #31,d5
  528.     tst.l    d7
  529. lenlp    bmi.s    endl
  530.     sub.l    #1,d5
  531.     bcs.l    error    ; this means there are no ones in divisor
  532.     lsl.l    #1,d7
  533.     jmp    lenlp
  534.  
  535. ;    Left justified divisor
  536.  
  537. endl    add.l    #1,d5    ;Length
  538.  
  539.     moveq    #0,d3
  540.     moveq    #31,d4
  541.     sub.l    d5,d4
  542.     add.l    #1,d4    ; Starting bit position in Answer
  543.  
  544. dlp2    move.l    d6,d5
  545.  
  546.     sub.l    d7,d5    ; d7-d2 to d6
  547.     bcs.s    divsk
  548.  
  549.     bset.l    d4,d3    ; set answer position to 1
  550.     move.l    d5,d6    ; save result
  551.  
  552. divsk    sub.l    #1,d4
  553.     bmi.s     DivE1
  554.     lsr.l    #1,d7
  555.     jmp    dlp2
  556.  
  557. DivE1    move.l    0(a0),d4
  558.     move.l    d3,0(a0,d4.w)
  559.     jmp    Ddis
  560.  
  561. Dzer0    move.l    0(a0,d4.w),d7
  562.     move.l    4(a0,d4.w),d6
  563.  
  564. ;    Divide
  565. ;    input d6,d7
  566. ;    output d3
  567. ;    distroyed d2,d4,d5
  568.  
  569.     moveq    #31,d5
  570.     tst.l    d7
  571. lenlp1    bmi.s    endl1
  572.     sub.l    #1,d5
  573.     bcs.l    error    ; this means there are no ones in divisor
  574.     lsl.l    #1,d7
  575.     jmp    lenlp1
  576.  
  577. ;    Left justified divisor
  578.  
  579. endl1    add.l    #1,d5    ;Length
  580.  
  581.     moveq    #0,d3
  582.     moveq    #31,d4
  583.     sub.l    d5,d4
  584.     add.l    #1,d4    ; Starting bit position in Answer
  585.  
  586. dlp21    move.l    d6,d5
  587.  
  588.     sub.l    d7,d5    ; d7-d2 to d6
  589.     bcs.s    divsk1
  590.  
  591.     bset.l    d4,d3    ; set answer position to 1
  592.     move.l    d5,d6    ; save result
  593.  
  594. divsk1    sub.l    #1,d4
  595.     bmi.s     DivE2
  596.     lsr.l    #1,d7
  597.     jmp    dlp21
  598.  
  599. DivE2    move.l    0(a0),d4
  600.     move.l    d3,4(a0,d4.w)
  601.  
  602. Ddis    cmpi.l    #5,d1
  603.     beq.s    nodo3
  604.     move.l    d1,12(a0)
  605. nodo3    jsr    Fswap
  606.     jsr    Display
  607.     jsr    Fswap
  608.     moveq    #1,d0
  609.     lea    Const,a0
  610.     move.l    d0,0(a0)
  611.     jmp    Finevnt
  612.  
  613. nopcnt    jsr    Display
  614.     jsr    Fswap
  615.     jmp    Finevnt
  616.  
  617.  
  618. noper    cmpi.l    #5,d1
  619.     beq.s    equnper
  620.     lea    VarPtr,a0
  621.     move.l    d1,12(a0)
  622.     jsr    Fswap
  623. equnper    jmp    Finevnt
  624.  
  625. per    lea    VarPtr,a0    ; if a valid operation and constant
  626.     move.l    d1,12(a0)    ; then store operation new operation
  627.     jmp    Finevnt        ; only.
  628.  
  629. ;
  630. ;    Move to other input varable
  631. ;
  632.  
  633. Fswap    lea    VarPtr,a0
  634.     move.l    0(a0),d3
  635.     beq.s    Fswze
  636.     moveq    #0,d4
  637.     move.l    d4,0(a0)
  638.     jmp    Fswend
  639. Fswze    moveq    #4,d4
  640.     move.l    d4,0(a0)
  641. Fswend    rts
  642.  
  643.  
  644. error    lea    EBufB,a0
  645.     lea    BufferB,a1
  646.     moveq    #0,d0
  647. ElpCl    move.w    0(a0,d0),d1
  648.     move.w    d1,0(a1,d0)
  649.     addi.w    #2,d0
  650.     cmpi.w    #136,d0
  651.     bne.s    ElpCl
  652.     jsr    print
  653.     moveq    #1,d0
  654.     lea    Err,a0
  655.     move.l    d0,0(a0)
  656.     jmp    equnper
  657.  
  658.  
  659. ItextB    dc.b    1,0
  660.     dc.b    RP_JAM2
  661.     dc.w    0,0
  662.     dc.l    0
  663.     dc.l    BufferB
  664.     dc.l    0
  665.  
  666. ItextO    dc.b    1,0
  667.     dc.b    RP_JAM2
  668.     dc.w    0,0
  669.     dc.l    0
  670.     dc.l    BufferO
  671.     dc.l    0
  672.  
  673. ItextH    dc.b    1,0
  674.     dc.b    RP_JAM2
  675.     dc.w    0,0
  676.     dc.l    0
  677.     dc.l    BufferH
  678.     dc.l    0
  679.  
  680. ItextD    dc.b    1,0
  681.     dc.b    RP_JAM2
  682.     dc.w    0,0
  683.     dc.l    0
  684.     dc.l    BufferD
  685.     dc.l    0
  686.  
  687. BufferB    dc.b    '00011100011100011100011100011100',0,0
  688. BufferO    dc.b    '0  3  4  3  4  3  4  3  4  3  4 ',0,0
  689. BufferH    dc.b    ' 1   C   7   1   C   7   1   C  ',0,0
  690. BufferD    dc.b    '                       208783132',0,0
  691. BufferT    dc.b    '                                ',0,0
  692.  
  693.     ds.b    2
  694.  
  695. CBufB    dc.b    '                               0',0,0
  696. CBufO    dc.b    '                              0 ',0,0
  697. CBufH    dc.b    '                             0  ',0,0
  698. CBufD    dc.b    '                               0',0,0
  699.  
  700.     ds.b    2
  701.  
  702. EBufB    dc.b    '   ********** Error **********  ',0,0
  703. EBufO    dc.b    '   ********** Error **********  ',0,0
  704. EBufH    dc.b    '   ********** Error **********  ',0,0
  705. EBufD    dc.b    '   ********** Error **********  ',0,0
  706.  
  707.     ds.b    2
  708.  
  709. VarPtr    ds.l    1
  710. Var    ds.l    1
  711.     ds.l    1
  712.  
  713. Oper    dc.l    0    ; 0,1,2,3,4 none,add,sub,Mult,Div
  714.  
  715. Const    dc.l    0
  716. Err    dc.l    0
  717. BufDec    dc.b    '                    '
  718. AscTmp    ds.b    12
  719. DecTemp    ds.w    3
  720. DecCon1    dc.w    $0000,$0000,$0001
  721. DecCon2    dc.w    $0000,$0000,$0016
  722. DecCon3    dc.w    $0000,$0000,$0256
  723. DecCon4    dc.w    $0000,$0000,$4096
  724. DecCon5    dc.w    $0000,$0006,$5536
  725. DecCon6    dc.w    $0000,$0104,$8576
  726. DecCon7    dc.w    $0000,$1677,$7216
  727. DecCon8    dc.w    $0002,$6843,$5456
  728. DecConE    dc.w    $0000,$0000,$0000
  729.  
  730.     end
  731.